import http from '@/http/http'

// 登录接口
export function login(data) {
    return http({
        method: 'post',
        url: '/adminLogin',
        data
    })
}
// 商家列表接口
export function getBusiness(params) {
    return http({
        method: 'get',
        url: '/petBusiness/get',
        params
    })
}

// 删除商家接口
export function delPetBusiness(params) {
    return http({
        method: 'get',
        url: '/petBusiness/delById',
        params
    })
}

// 订单列表接口   restFull restFull风格
export function getOrder(page,pageSize,keywords) {
    return http({
        method: 'get',
        url: `/petOrder/get/${page}/${pageSize}/${keywords}`,
    })
}

// 删除订单接口   restFull restFull风格
export function delOrder(id) {
    return http({
        method: 'get',
        url: `/petOrder/delete/${id}`
    })
}
// 用户列表接口
export function getUser(params) {
    return http({
        methods: 'get',
        url: `/userList/get`,
        params
    })
}

// 删除用户接口
export function delUser(params) {
    return http({
        method: 'get',
        url: `/user/delete`,
        params 
    })
}

// 伴宠日志列表接口  restFull restFull风格
export function getDairy(page,pageSize,keywords){
    return http({
        method: 'get',
        url: `/petDairy/get/${page}/${pageSize}/${keywords}`
    })
}

// 删除伴宠日志接口
export function delDairy(id) {
    return http({
        method: 'delete',
        url: `/petDairy/delete/${id}`
    })
}
// 添加伴宠日志
// 添加商家信息接口
export function addDatiry(data) {
    return http({
        method: 'post',
        url: '/petDatiry/add',
        data
    })
}


// 添加商家信息接口
export function addPetBusiness(data) {
    return http({
        method: 'post',
        url: '/petBusiness/add',
        data
    })
}
// 根据商家id查询商家信息
export function getBuninessById(params) {
    return http({
        method: 'get',
        url: '/petBusiness/getById',
        params
    })
}
// 修改商家信息
export function upDateBusiness(data) {
    return http({
        method: 'post',
        url: '/petBusiness/update',
        data
    })
}